//
//  Taobao.m
//  HYHOME
//
//  Created by cjy on 16/2/28.
//  Copyright © 2016年 Mac. All rights reserved.
//

#import "Taobao.h"
#import "Model.h"
@interface Taobao ()<UIWebViewDelegate>

@property (nonatomic,retain)UIWebView *webView;

@end

@implementation Taobao

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor =[UIColor whiteColor];

}

-(void)passModel:(Model *)model{
    
    
    
    
    CGRect frame = self.view.frame;
    self.webView = [[UIWebView alloc ]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(frame), CGRectGetHeight(frame))];
    self.webView.backgroundColor = [UIColor whiteColor];
    self.webView.userInteractionEnabled =YES;
    self.webView.delegate = self;
    self.webView.opaque = NO;
    [self.view addSubview:self.webView];
    
    NSURL *url = [NSURL URLWithString:model.purchase_url];
    [self.webView loadRequest:[NSURLRequest requestWithURL:url]];
    
    
    
    
    
    
    
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
